package com.itheima.test8;

import java.text.SimpleDateFormat;

public class Test {

    public static void main(String[] args) {

        /*Singer singer = new Singer();
        singer.sing();*/
        //继承了singger类的子类
        new Singer(){
            @Override
            void sing() {
                System.out.println("只因你太美");
            }
        }.sing();
        new Singer(){
            @Override
            void sing() {
                System.out.println("只因你太美");
            }
        }.sing();
    }

}

class Singer{
    void sing(){
        System.out.println("大碗宽面");
    }
}
